package han.cirno.corrupt.util

import kotlin.math.max
import kotlin.math.min

object MathUtil {
    fun isIn(min: Int, value: Int, max: Int): Boolean {
        return value in min..max
    }

    fun shrink(min: Int, value: Int, max: Int): Int {
        return max(min, min(max, value))
    }
}